package org.example.xls.controller;

import org.example.xls.pojo.Test;
import org.example.xls.service.TestIntroductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class IntroductController {
    @Autowired
    private TestIntroductService testIntroductService;

    /**
     * 测评方案介绍
     * @param testId
     * @return
     */
    @GetMapping("/introduct")
    public Test introduct(@RequestParam Integer testId) {
        return testIntroductService.getTestIntroduct(testId+1);//前端下标从0开始，数据库下标从1开始
    }
}